const dbConfig = require('../config/service')

function request (sql, arr=[]) {
  return new Promise((resolve, reject) => {
    dbConfig(sql, arr, (err, data) => {
      if (data) {
        resolve(data)
      } else {
        reject(err)
      }
    })
  })
}
module.exports = request